Integrand size = 28, antiderivative size = 82 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=-\frac {(i A+B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}+\frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3607, 3561, 212} \[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {-B+i A}{d \sqrt {a+i a \tan (c+d x)}}-\frac {(B+i A) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d} \]
[In]
[Out]
Rule 212
Rule 3561
Rule 3607
Rubi steps \begin{align*} \text {integral}& = \frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) \int \sqrt {a+i a \tan (c+d x)} \, dx}{2 a} \\ & = \frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}}-\frac {(i A+B) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d} \\ & = -\frac {(i A+B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}+\frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}} \\ \end{align*}
Time = 0.50 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=-\frac {(i A+B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}+\frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}} \]
[In]
[Out]
Time = 0.14 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.87
method | result | size |
derivativedivides | \(\frac {2 i \left (-\frac {\left (\frac {A}{2}-\frac {i B}{2}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2 \sqrt {a}}-\frac {-\frac {A}{2}-\frac {i B}{2}}{\sqrt {a +i a \tan \left (d x +c \right )}}\right )}{d}\) | \(71\) |
default | \(\frac {2 i \left (-\frac {\left (\frac {A}{2}-\frac {i B}{2}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2 \sqrt {a}}-\frac {-\frac {A}{2}-\frac {i B}{2}}{\sqrt {a +i a \tan \left (d x +c \right )}}\right )}{d}\) | \(71\) |
parts | \(\frac {2 i A a \left (-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{4 a^{\frac {3}{2}}}+\frac {1}{2 a \sqrt {a +i a \tan \left (d x +c \right )}}\right )}{d}+\frac {B \left (-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2 \sqrt {a}}-\frac {1}{\sqrt {a +i a \tan \left (d x +c \right )}}\right )}{d}\) | \(114\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 328 vs. \(2 (63) = 126\).
Time = 0.26 (sec) , antiderivative size = 328, normalized size of antiderivative = 4.00 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {{\left (\sqrt {2} a d \sqrt {-\frac {A^{2} - 2 i \, A B - B^{2}}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (-\frac {4 \, {\left ({\left (-i \, A - B\right )} a e^{\left (i \, d x + i \, c\right )} + {\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {A^{2} - 2 i \, A B - B^{2}}{a d^{2}}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - \sqrt {2} a d \sqrt {-\frac {A^{2} - 2 i \, A B - B^{2}}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (-\frac {4 \, {\left ({\left (-i \, A - B\right )} a e^{\left (i \, d x + i \, c\right )} - {\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {A^{2} - 2 i \, A B - B^{2}}{a d^{2}}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - 2 \, \sqrt {2} {\left ({\left (-i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - i \, A + B\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, a d} \]
[In]
[Out]
\[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int \frac {A + B \tan {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.11 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {i \, {\left (\sqrt {2} {\left (A - i \, B\right )} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + \frac {4 \, {\left (A + i \, B\right )} a}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\right )}}{4 \, a d} \]
[In]
[Out]
\[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\int { \frac {B \tan \left (d x + c\right ) + A}{\sqrt {i \, a \tan \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
Time = 0.89 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.43 \[ \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx=\frac {A\,1{}\mathrm {i}}{d\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}-\frac {B}{d\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}+\frac {\sqrt {2}\,A\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{2\,\sqrt {-a}\,d}-\frac {\sqrt {2}\,B\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {a}}\right )}{2\,\sqrt {a}\,d} \]
[In]
[Out]